# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-proxylist
_pkgname=proxylist
pkgver=0.2.1
pkgrel=4
pkgdesc='Managing list of proxies.'
arch=('any')
url='https://pypi.org/project/proxylist/#files'
license=('MIT')
depends=('python' 'python-six')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('9c935e2dcc606f6f1c96a2a52befb1997409442841414950742646274c145fdad065978bcd674c0909e969298f1119aaf1248b77f6ec4a50558d656a65ee863d')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

